<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Single</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta charset="utf-8">
    <meta name="keywords" content="" />
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
    <!-- bootstrap-css -->
    <link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
    <!--// bootstrap-css -->
    <!-- css -->
    <link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
    <!--// css -->
    <!-- font-awesome icons -->
    <link href="css/font-awesome.css" rel="stylesheet">
    <!-- //font-awesome icons -->

    <script src="js/jquery-1.11.1.min.js"></script>
    <script src="js/bootstrap.js"></script>
    <script type="text/javascript">
        jQuery(document).ready(function($) {
            $(".scroll").click(function(event){
                event.preventDefault();
                $('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
            });
        });
    </script>
    <script type="text/javascript">
        function formatDate(val) {
            var date = new Date(val);
            var y = date.getFullYear();
            var m = date.getMonth() + 1;
            var d = date.getDate();
            return y + '-' + m + '-' + d;
        }
    </script>
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <![endif]-->
</head>
<body>
<!-- banner -->
<div class="banner jarallax">
    <div class="banner-dot">
        <div class="header-top">
            <div class="container">
                <div class="header-top-left">
                    <p><i class="fa fa-home" aria-hidden="true"></i> 西永大道 , 重庆沙坪坝</p>
                </div>
                <div class="header-top-right">
                    <p><i class="fa fa-phone" aria-hidden="true"></i> +114514</p>
                </div>
            </div>
        </div>
        <div class="header">
            <div class="container">
                <div class="header-left">
                    <div class="w3layouts-logo">
                        <h1>

                            <a href="/front/indexs">汽车时代</a>

                        </h1>
                    </div>
                </div>
                <div class="clearfix"> </div>
            </div>
        </div>

        <div class="header-right about-top">
            <div class="container">
                <div class="top-nav">
                    <nav class="navbar navbar-default">
                        <div class="navbar-header">
                            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                                <span class="sr-only">Toggle navigation</span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </button>
                        </div>
                        <!--navbar-header-->
                        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                            <ul class="nav navbar-nav navbar-right">
                                <li><a href="/front/indexs" class="active">首页</a></li>
                                <li><a href="/front/about">关于我们</a></li>
                                <li><a href="/front/gallery">汽修产品</a></li>
                                <li class=""><a href="#" class="dropdown-toggle hvr-bounce-to-bottom" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">预约服务<span class="caret"></span></a>
                                    <ul class="dropdown-menu">
                                        <li><a class="hvr-bounce-to-bottom" href="/front/contact">在线预约</a></li>
                                        <li><a class="hvr-bounce-to-bottom" href="#">上门检修</a></li>
                                    </ul>
                                </li>
                                <li><a href="/front/blog">信息中心</a></li>
                                <li class=""><a href="#" class="dropdown-toggle hvr-bounce-to-bottom" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">联系我们<span class="caret"></span></a>
                                    <ul class="dropdown-menu">
                                        <li><a class="hvr-bounce-to-bottom" href="/front/recruitment">精英招聘</a></li>
                                        <li><a class="hvr-bounce-to-bottom" href="/front/CustomerMessage">客户留言</a></li>
                                    </ul>
                                </li>
                            </ul>
                            <div class="clearfix"> </div>
                        </div>
                    </nav>
                </div>
                <div class="clearfix"> </div>
            </div>
        </div>
        <div class="wthree-heading">
            <h2>消息推送</h2>
        </div>
    </div>
</div>
<!-- //banner -->
<!-- single -->
<div class="blog">
    <div class="container">
        <div class="agile-blog-grids">
            <div class="col-md-8 agile-blog-grid-left">
                <div class="agile-blog-grid">
                    <div class="agile-blog-grid-left-img">
                        <a href="/front/single"><img src="${news.newpic}" alt="" /></a>
                    </div>
                    <div class="blog-left-grids">
                        <div class="blog-left-left">
                            <i class="fa fa-pencil" aria-hidden="true"></i>
                        </div>
                        <div class="blog-left-right">
                            <div class="blog-left-right-top">
                                <h4>${news.newhead}</h4>
                                <p>Posted By <a href="#">${news.newadmin}</a> &nbsp;&nbsp;<fmt:formatDate value="${news.newdate}" pattern="yyyy-MM-dd HH:mm:ss  "/>  &nbsp;&nbsp;</p>
                            </div>
                            <div class="blog-left-right-bottom">
                                ${news.newcont}
                            </div>
                        </div>
                        <div class="clearfix"> </div>
                    </div>
                </div>
            </div>
            <div class="col-md-4 agile-blog-grid-right">
                <div class="categories">
                    <h3>热点新闻</h3>
                    <ul id="LastUi">

                    </ul>
                </div>
                <div class="categories">
                    <h3>往期回顾</h3>
                    <ul class="marked-list offs1">
                        <li><a href="#">May 2017 (7)</a></li>
                        <li><a href="#">April 2017 (11)</a></li>
                        <li><a href="#">March 2017 (12)</a></li>
                        <li><a href="#">February 2017 (14)</a> </li>
                        <li><a href="#">January 2017 (10)</a></li>
                        <li><a href="#">December 2017 (12)</a></li>
                        <li><a href="#">November 2017 (8)</a></li>
                        <li><a href="#">October 2017 (7)</a> </li>
                        <li><a href="#">September 2017 (8)</a></li>
                        <li><a href="#">August 2017 (6)</a></li>
                    </ul>
                </div>
            </div>
            <div class="clearfix"> </div>
        </div>
    </div>
</div>
<!-- //single -->
<!-- footer -->
<div class="w3-agile-footer">
    <div class="container">
        <div class="footer-grids">
            <div class="col-md-3 footer-grid">
                <div class="footer-grid-heading">
                    <h4>地址</h4>
                </div>
                <div class="footer-grid-info">
                    <p>恒达汽修有限公司
                        <span>地　址：重庆市万州区厦门路602号</span>
                    </p>
                    <p class="phone">电　话：020-5856-1762
                        <span>Email : <a href="mailto:wuhongyacao@outlook.com">wuhongyacao@outlook.com</a></span>
                    </p>
                </div>
            </div>


            <div class="col-md-3 footer-grid">
                <div class="footer-grid-heading">
                    <h4>Follow</h4>
                </div>
                <div class="social">
                    <ul>
                        <li><a href="#"><i class="fa fa-facebook"></i></a></li>
                        <li><a href="#"><i class="fa fa-twitter"></i></a></li>
                        <li><a href="#"><i class="fa fa-rss"></i></a></li>
                        <li><a href="#"><i class="fa fa-vk"></i></a></li>
                    </ul>
                </div>
            </div>
            <div class="clearfix"> </div>
        </div>
        <div class="agileits-w3layouts-copyright">
            <p>Copyright &copy; 2018.Company name All rights reserved.Technical support by Takahashi Wuu</p>
        </div>
    </div>
</div>
<!-- //footer -->
<script src="js/jarallax.js"></script>
<script src="js/SmoothScroll.min.js"></script>
<script type="text/javascript">
    /* init Jarallax */
    $('.jarallax').jarallax({
        speed: 0.5,
        imgWidth: 1366,
        imgHeight: 768
    })
</script>

<script type="text/javascript" src="js/move-top.js"></script>
<script type="text/javascript" src="js/easing.js"></script>
<!-- here stars scrolling icon -->
<script type="text/javascript">
    $(document).ready(function() {
        $().UItoTop({ easingType: 'easeOutQuart' });
        $.ajax({
            url: "/front/news/queryLast",
            type: "POST",
            cache: false,
            dataType: "json",
            success: function (data) {
                console.log(data);
                if(data.success){
                    for(var i = 0; i<data.data.length;i++){
                        $("#LastUi").append(" <li><a href='/news/queryById?id="+data.data[i].newid+"'>"+data.data[i].newhead+"</a></li>")
                    }
                }else{
                    $("#LastUi").append(" <li><a href='#'>最近还没有什么新闻哦！</a></li>");
                }
            }
        });
    });
</script>
<!-- //here ends scrolling icon -->
</body>
</html>
